/**
 * 克隆评论页面
 * @param commentList
 */
function cloneComment(replyList){
    var s = "";
    $.each(replyList,function(){
        s += "<li><a href=\"article/"+this.article.articleId + "\">\n" +
            "                    <div class=\"header \">\n" +
            "                        <img class=\"user-img\" src=\""+ this.replyToId.picture + "\">\n" +
            "                        <div class=\"name-time-wrapper\">\n" +
            "                            <span class=\"time\">"+ this.replyToId.nickName + "</span>\n" +
            "                            <span class=\"time\"><i class=\"glyphicon glyphicon-time\"></i>"+ this.replyDate + "</span>\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <img class=\"thumb\" src=\"" + this.article.articlePicture + "\">\n" +
            "                    <span class=\"text\">" + this.replyText + "</span>\n" +
            "                </a></li>"
    })
    return s;
}

/**
 * 克隆页面
 */
function cloneArticle(articleList,msg){
    var s = "";
    $.each(articleList,function(){
        s += "<article class=\"excerpt\">" +
            "                        <div class=\"header \">" +
            "                            <img class=\"user-img\" src=\"" + this.userInfo.picture + "\">" +
            "                            <div class=\"name-time-wrapper\"><span class=\"time\">" + this.userInfo.nickName + "</span><span class=\"time\">" +
            "                        <i class=\"glyphicon glyphicon-time\"></i>" + this.articleDate + "</span>" +
            "                            </div>" +
            "                            <div class=\"author_r\">" +
            "                                <div class=\"digg\" id = \"heart\">" +
            "                                    <i class=\"glyphicon glyphicon-heart\"></i><span>" + this.collectedNum + "</span>" +
            "                                </div>" +
            "                            </div>" +
            "                        </div>" +
            "                        <div style=\"clear: both;\"></div>" +
            "                        <div class=\"mycontext\">";
        if (this.articlePicture != "") {
            s += "" +
                "                             <a class=\"focus\" href=\"#\" target=\"_blank\">" +
                "                                                <img class=\"thumb\" src=\"" + this.articlePicture + "\" style=\"display: inline;\">" +
                "                             </a>"
        }
        $.each(this.tags,function() {
            s += "<a class=\"cat\" href=\"tag/" + this.tagId + "\">" + this.tagName + "<i></i></a>"
        })
        s += "<h2><a href=\"article/" + this.articleId + "\" target=\"_blank\">" + this.title + "</a></h2>" +
            "                            <input type=\"hidden\"  id=\"hAId\" value=\"" + this.articleId + "\">" +
            "                            <p class=\"meta\"></p><p class=\"note\">" + this.simContent + "</p>" +
            "                        </div>" +
            "                        <div class=\"ff\">" +
            "                            <div class=\"iiicon pull-left\">" +
            "                                <div class=\"digg\" id=\"zan\">" +
            "                                    <i class=\"glyphicon glyphicon-thumbs-up\"></i>" +
            "                                    <span>" + this.zanNum + "</span>" +
            "                                </div>" +
            "                                <div class=\"digg\" id=\"cai\">" +
            "                                    <i class=\"glyphicon glyphicon-thumbs-down\"></i>" +
            "                                    <span>" + this.caiNum + "</span>" +
            "                                </div>" +
            "                            </div>" +
            "                            <div class=\"digg\">" +
            "                                <i class=\"glyphicon glyphicon-comment\"></i>" +
            "                                <span><a href='javascript:;' onclick='findGoodComment(this);' >查看神评</a></span>" +
            "                            </div>" +
            "                        </div>" +
            "                    </article>";
    })
    s +="\"<div class='alert alert-info text-center' id='more' onclick='moreArticle();'>"+ msg + "</div>\"";
    return s;
}
/**
 * 克隆评论区域
 */
function cloneCommentByReader(replyList) {
    var s = "<div class='comment-show-con clearfix'>" +
            "           <input id=\"replyToId\" type=\"hidden\" value=\"" + replyList.replyToId.userId + "\">" +
            "          <input id=\"replyFromId\" type=\"hidden\" value=\"" + replyList.replyFromId.userId + "\"> " +
            "          <input id=\"replyId\" type=\"hidden\" value=\"" + replyList.replyId + "\"> " +
            "<div class=\"comment-show-con-img pull-left\">" +
            "<img id=\"commentImg\" src=\"" + replyList.replyFromId.picture + "\" class='img-gg' alt=\"\">" +
            "</div>" +
            "<div class=\"comment-show-con-list pull-left clearfix\">" +
            "   <div class=\"date-dz\">" +
        "       <a href=\"#\" class=\"comment-size-name\">" + replyList.replyFromId.nickName + "  " + replyList.replyDate + " </a> " +
        "       <span class=\"my-pl-con\" >&nbsp;" + replyList.replyText + "</span>" +
            "       <div class='date-dz-right pull-right comment-pl-block'>" +
            "                        <div class=\"ff\">" +
            "                            <div class=\"iiicon pull-left\">" +
            "                                <div class=\"digg\" id=\"zan1\">" +
            "                                    <i class=\"glyphicon glyphicon-thumbs-up\"></i>" +
            "                                    <span>" + replyList.replyZan + "</span>" +
            "                                </div>" +
            "                                <div class=\"digg\" id=\"cai1\">" +
            "                                    <i class=\"glyphicon glyphicon-thumbs-down\"></i>" +
            "                                    <span>" + replyList.replyCai + "</span>" +
            "                                </div>" +
            "                            </div>" ;
            if ($("#userIdByArticle").val() == $("#hId").val()){
              s += "<a href='javascript:;' class='removeBlock' onclick='deleteComment(this)'>删除</a>" +
                  " <a href='javascript:;' class='date-dz-pl pl-hf hf-con-block pull-left' onclick='replyByComment(this)'>回复</a>";
            }
          s+=  "       </div>" +
            "   </div>" +
            "</div>" +
            "</div>" +
            "</div>";
    return s;
}

/**
 * 克隆评论的回复区域
 */
function cloneReply(replyList) {
    var s = "<div class='comment-show-con clearfix'>" +
        "          <input id=\"replyToId\" type=\"hidden\" value=\"" + replyList.replyToId.userId + "\">" +
        "          <input id=\"replyFromId\" type=\"hidden\" value=\"" + replyList.replyFromId.userId + "\"> " +
        "          <input id=\"replyId\" type=\"hidden\" value=\"" + replyList.replyId + "\"> " +
        "          <input id=\"commentId\" type=\"hidden\" value=\"" + replyList.commentId + "\"> " +
        "        <div class='.left-gg'>" +
        "             <img id='commentImg' src='" + replyList.replyFromId.picture + "' class='img-gg' style='margin-left: 50px;'>" +
        "              <a href=\"#\" class=\"comment-size-name\">" + replyList.replyFromId.nickName + "  " + replyList.replyDate + " </a> " +
        "              <span class=\"my-pl-con\" >&nbsp;" + replyList.replyText + "</span>" +
        "            <div class='date-dz-right pull-right comment-pl-block'>" +
        "                   <div class='ff'>";
    if ($("#userIdByArticle").val() == $("#hId").val() || replyList.replyToId.userId == $("#hId").val() ){
                         s += "<a href='javascript:;' class='removeBlock' onclick='deleteComment(this)'>删除</a>" +
                             "<a href='javascript:;' class='date-dz-pl pl-hf hf-con-block pull-left' onclick='replyByReply(this)'>回复</a";
    }
    s+=    "                   </div>" +
        "            </div>" +
        "       </div>" +
        "</div>";
    return s;
}
/**
 * 克隆神论区域
 */
function cloneGodComment(replyList) {
    var s = "<div class=\"comment-show-con clearfix\" style=\"margin-left:120px\">" +
        "           <input id=\"replyToId\" type=\"hidden\" value=\"" + replyList.replyToId.userId + "\">" +
        "          <input id=\"replyFromId\" type=\"hidden\" value=\"" + replyList.replyFromId.userId + "\"> " +
        "          <input id=\"replyId\" type=\"hidden\" value=\"" + replyList.replyId + "\"> " +
        "<div class=\"comment-show-con-img pull-left\">" +
        "<img id=\"commentImg\" src=\"" + replyList.replyFromId.picture + "\" style=\"width:48px;height:48px;border-radius:5px\" alt=\"\">" +
        "</div>" +
        "<div class=\"comment-show-con-list pull-left clearfix\">" +
        "   <div class=\"pl-text clearfix\">" +
        "       <a href=\"#\" class=\"comment-size-name1\">" + replyList.replyFromId.nickName + " </a> " +
        "       <span class=\"my-pl-con1\" >&nbsp;" + replyList.replyText + "  " + replyList.replyDate + "</span>" +
        "   </div>" +
        "   <div class=\"hf-list-con\">" +
        "   </div>" +
        "   <div class=\"date-dz\">" +
        "       <div class=\"date-dz-right pull-right comment-pl-block\">" +
        "       </div>" +
        "   </div>" +
        "</div>" +
        "</div>";
    return s;
}

/**
 * 克隆粉丝排行榜
 * @param userList
 * @returns {string}
 */
function cloneBestFans(userList){
    var s ="";
    s+="<div class=\"user_card\">\n" +
        "            <div class=\"maozi\"></div>\n" +
        "            <div class=\"without-side\">\n" +
        "                <div>\n" +
        "                    <div class=\"avatar-unit\">\n" +
        "                        <div class=\"avatar-pic\">\n" +
        "                            <a rel=\"nofollow\" href='javascript:void()'><img width=\"140\" height=\"140\" src='"+userList.picture+"'></a>\n" +
        "                        </div>\n" +
        "                    </div>\n" +
        "                    <div class=\"avatar-info\">\n" +
        "                        <h1>"+userList.nickName+"</h1>\n" +
        "                        <p class=\"personalInfo less clearfix\"><span class=\"label\">姓名：</span><span class=\"f-l\">"+userList.nickName+"</span></p>\n" +
        "                        <p class=\"personalInfo muted clearfix\"><span class=\"label\">性别：</span><span class=\"f-l\">"+userList.sex+"</span></p>\n" +
        "                    </div>\n" +
        "                </div>\n" +
        "                <div class=\"right\">\n" +
        "                    <div class=\"ggggg\">\n" +
        "                    <span>粉丝数:"+userList.fansNum+"</span>\n" +
        "                    </div>\n" +
        "                </div>\n" +
        "            </div>\n" +
        "        </div>"

    return s;
}

/**
 * 克隆神评论排行榜
 * @param replyList
 * @returns {string}
 */
function cloneBestReply(replyList){
    var s ="";
    s+="<div class=\"user_card\">\n" +
        "            <div class=\"maozi\"></div>\n" +
        "            <div class=\"without-side\">\n" +
        "                <div>\n" +
        "                    <div class=\"avatar-unit\">\n" +
        "                        <div class=\"avatar-pic\">\n" +
        "                            <a rel=\"nofollow\" href='javascript:void()'><img width=\"140\" height=\"140\" src='"+replyList.replyToId.picture+"'></a>\n" +
        "                        </div>\n" +
        "                    </div>\n" +
        "                    <div class=\"avatar-info\">\n" +
        "                        <h1>"+replyList.replyToId.nickName+"</h1>\n" +
        "                        <p class=\"personalInfo less clearfix\"><span class=\"label\">姓名：</span><span class=\"f-l\">"+replyList.replyToId.nickName+"</span></p>\n" +
        "                        <p class=\"personalInfo muted clearfix\"><span class=\"label\">性别：</span><span class=\"f-l\">"+replyList.replyToId.sex+"</span></p>\n" +
        "                    </div>\n" +
        "                </div>\n" +
        "                <div class=\"right\">\n" +
        "                    <div class=\"ggggg\">\n" +
        "                    <span>"+replyList.replyDate+"   "+replyList.replyText +"</span>\n" +
        "                    </div>\n" +
        "                </div>\n" +
        "            </div>\n" +
        "        </div>"

    return s;
}